package com.itheima.Daome01.demo01.arrys;


import java.util.ArrayList;
import java.util.List;
import java.util.Random;
import java.util.stream.Collectors;

public class Test02 {
    public static void main(String[] args) {
        ArrayList<Integer> list = new ArrayList<>();
        Random r = new Random();
        for (int i = 0; i < 10; i++) {
            list.add(r.nextInt(100) + 1);
        }
        List<Integer> collect = list.stream().filter(s -> s % 2 == 0).collect(Collectors.toList());

        System.out.println(collect);;



    }
}
